package nets

import (
	"github.com/spf13/pflag"
	"github.com/spf13/viper"
	"github.com/wutianze/nats.go"
)

type GlueNets interface {
	Connect() error
	InitFlag(flags *pflag.FlagSet)
	InitViper(viper *viper.Viper)
	Subscribe(subject string, f func(m NetContext)) (*nats.Subscription, error)
	Request(subject string, req []byte) ([]byte, error)
	Publish(subject string, req []byte) error
	Close() error
}
